package com.atguigu05._super;

/**
 * ClassName: Student
 * Package: com.atguigu05._super
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/22 10:30
 * @Version 1.0
 */
public class Student extends Person {
    // 属性
    String school;
    int id = 10010; // 学号

    // 方法
    public void study() {
        System.out.println("好好学习");
    }

    public void eat() {
        System.out.println("干饭有精神");
    }

    public void sleep() {
        System.out.println("喜欢睡懒觉");
    }

    public void show() {
        eat();
        super.eat();
    }

    public void show1() {
        doSport();
    }

    public void show2() {
        System.out.println(id);
        System.out.println(super.id);
    }

    public void show3() {
        System.out.println(name);
    }
    // 测试super调用父类的构造器
    public Student(){
        super();
        System.out.println("Student()...");
    }
    public Student(String name,int age){

    }
}
